package com.clouddot.baipai.model;


import android.content.Context;

import com.clouddot.baipai.contract.IEvaluateFragmentContract;
import com.clouddot.baipai.http.BanPaiRetrofitHelper;
import com.clouddot.baipai.http.entity.response.getAllWeekResponse;
import com.clouddot.baipai.http.entity.response.getEvaluateByDayResponse;
import com.clouddot.baipai.http.entity.response.getEvaluateByWeekResponse;
import com.clouddot.baipai.infrastructure.environment.Env;

import org.wxy.sdk.base.impl.BaseModelImpl;

import java.util.ArrayList;

import rx.Observable;

public class EvaluateFragmentModel extends BaseModelImpl implements IEvaluateFragmentContract.IModel {
    public EvaluateFragmentModel(Context context) {
        super(context);

    }

    @Override
    public Observable<getAllWeekResponse> getAllWeek(String acttype) {
        return BanPaiRetrofitHelper.getInstance(Env.getContent()).getServer().getAllWeek(Env.getAppContext().IP,acttype);
    }

    @Override
    public Observable<ArrayList<getEvaluateByDayResponse>> getEvaluateByDay(String acttype, String ObjectType, String ClassId, String CurDate) {
        return BanPaiRetrofitHelper.getInstance(Env.getContent()).getServer().getEvaluateByDay(Env.getAppContext().IP,acttype,ObjectType,ClassId,CurDate);
    }

    @Override
    public Observable<ArrayList<getEvaluateByWeekResponse>> getEvaluateByWeek(String acttype, String ObjectType, String ClassId, String WeekId) {
        return BanPaiRetrofitHelper.getInstance(Env.getContent()).getServer().getEvaluateByWeek(Env.getAppContext().IP,acttype,ObjectType,ClassId,WeekId);
    }
}
